CFLAGS := -Wall -O2 -g

CFLAGS += -I $(TOPDIR)/tools/readline/include
CFLAGS += -I ../App/include

LDFLAGS := -L$(TOPDIR)/tools/readline/lib -lreadline 
LDFLAGS += -L../App -lsetting -lpthread
LDFLAGS += -L$(TOPDIR)/tools/ncurses/lib -lncurses

TARGET := cli 

SRCS := $(wildcard *.c)

OBJS := $(SRCS:.c=.o)

all:clean $(TARGET)

$(TARGET) : $(OBJS)
	$(CC)  -o $@ $^ $(LDFLAGS)

%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $< 

clean:
	rm -f $(OBJS) $(TARGET)
